<template>
  <div>
    <button @click="showPopup">显示弹窗</button>
    <div v-if="isPopupVisible" class="popup">
      <p>This is a one-time popup message.</p>
      <button @click="closePopup">关闭</button>
    </div>
  </div>
</template>

<script>
export default {
  name:"pop",
  data() {
    return {
      isPopupVisible: true
    };
  },
  methods: {
    showPopup() {
      this.isPopupVisible = true;
    },
    closePopup() {
      this.isPopupVisible = false;
    }
  }
};
</script>

<style>
.popup {
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
</style>
